// BBB.cpp : implementation file
//

#include "stdafx.h"
#include "MFCDisp.h"
#include "BBB.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CBBB

IMPLEMENT_DYNCREATE(CBBB, CCmdTarget)

CBBB::CBBB()
{
	EnableAutomation();
}

CBBB::~CBBB()
{
}


void CBBB::OnFinalRelease()
{
	// When the last reference for an automation object is released
	// OnFinalRelease is called.  The base class will automatically
	// deletes the object.  Add additional cleanup required for your
	// object before calling the base class.

	CCmdTarget::OnFinalRelease();
}


BEGIN_MESSAGE_MAP(CBBB, CCmdTarget)
	//{{AFX_MSG_MAP(CBBB)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

BEGIN_DISPATCH_MAP(CBBB, CCmdTarget)
	//{{AFX_DISPATCH_MAP(CBBB)
	DISP_FUNCTION(CBBB, "Add", Add, VT_I4, VTS_I4 VTS_I4)
	//}}AFX_DISPATCH_MAP
END_DISPATCH_MAP()

// Note: we add support for IID_IBBB to support typesafe binding
//  from VBA.  This IID must match the GUID that is attached to the 
//  dispinterface in the .ODL file.

// {C5AE7BB5-CCC5-4E8E-BB69-8A2F7540B4B2}
static const IID IID_IBBB =
{ 0xc5ae7bb5, 0xccc5, 0x4e8e, { 0xbb, 0x69, 0x8a, 0x2f, 0x75, 0x40, 0xb4, 0xb2 } };

BEGIN_INTERFACE_MAP(CBBB, CCmdTarget)
	INTERFACE_PART(CBBB, IID_IBBB, Dispatch)
END_INTERFACE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CBBB message handlers

long CBBB::Add(long n1, long n2) 
{
	// TODO: Add your dispatch handler code here

	return n1+n2;
}
